﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.Attachment
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.Attachment;

    public class MapAttachment : EntityMapping<Attachment>
    {
        public MapAttachment()
        {
            Property(x => x.RecordId, map =>
            {
                map.Length(40);
            });

            Property(x => x.FileName, map =>
            {
                map.Length(400);
            });

            Property(x => x.OriginalFileName, map =>
            {
                map.Length(1000000);
            });
            
            Property(x => x.UploadUserName, map =>
            {
                map.Length(50);
            });

            Property(x => x.TypeName, map =>
            {
                map.Length(50);
            });

            Property(x => x.DownloadCount, map =>
            {
            });

            Property(x => x.DownloadLog, map =>
            {
                map.Length(90000000);
            });
        }
    }
}
